<style>
    .small {
        margin-top: 10px;
    }
</style>
            
<div class="wrapper-md" ng-controller="ProductOneCtrl">
    <div class="panel panel-default">
        <form form-validation>
        <div class="panel-body" style="padding: 40px;">
            <div class="form-horizontal">
                <div class="form-group">
                  <label>产品名称</label>
                  <input required ng-model="item.productName" type="text" class="form-control" placeholder="请输入产品名称，如：VR样板间">
                </div>
                <div class="form-group" style="width: 500px;">
                  <label>封面</label>
                  <p ng-show="item.coverPic">
                    <img ng-src="{{item.coverPic}}" width="200" alt="">
                  </p>
                  <input type="file" nv-file-select="" uploader="uploader">
                  <p class="small">请选择宽高比为4:3，分辨率在800*600以上，大小在500k以内的jpeg格式图片；</p>
                </div>
                <div class="form-group">
                  <label>虚拟浏览量</label>
                  <input required type="number" ng-model="item.mockScanNum" style="width: 100px;" class="form-control" placeholder="0">
                  <p class="small">真实浏览量为{{item.scanNum}}，总浏览量为{{item.mockScanNum + item.scanNum}}</p>
                </div>
                <div class="form-group">
                  <label>虚拟成交量</label>
                  <input required type="number" ng-model="item.mockDealNum" style="width: 100px;" class="form-control" placeholder="0">
                  <p class="small">真实成交量为{{item.dealNum}}，总成交量为{{item.mockDealNum + item.dealNum}}</p>
                </div>
                <div class="form-group">
                  <label>前台显示</label>
                  <ui-select required style="width: 120px;" ng-model="item.isDisplay" theme="bootstrap">
                        <ui-select-match placeholder="请选择">{{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="item.id as item in mappers.isDisplay | filter: $select.search">
                          <span ng-bind-html="item.name"></span>
                        </ui-select-choices>
                  </ui-select>
                </div>
                <div class="form-group">
                  <label>首页推荐显示</label>
                  <ui-select required style="width: 120px;" ng-model="item.order" theme="bootstrap">
                        <ui-select-match placeholder="请选择">{{$select.selected}}</ui-select-match>
                        <ui-select-choices repeat="item in mappers.order | filter: $select.search">
                          <span ng-bind-html="item"></span>
                        </ui-select-choices>
                  </ui-select>
                </div>
                <div class="form-group">
                  <label>发布时间</label>
                  <div class="input-group" style="width: 250px;">
                      <input required type="text" class="form-control" ng-model="item.publishTime" datepicker-popup="yyyy-MM-dd" ng-model="dt" is-open="opened[0]" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
                      <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="open($event, 0)"><i class="glyphicon glyphicon-calendar"></i></button>
                      </span>
                  </div>
                </div>
                <div class="form-group">
                  <label>优惠</label>
                  <ui-select required style="width: 120px;" ng-model="item.isDiscount" theme="bootstrap">
                        <ui-select-match placeholder="选择优惠">{{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="item.id as item in mappers.isDiscount | filter: $select.search">
                          <span ng-bind-html="item.name"></span>
                        </ui-select-choices>
                  </ui-select>
                </div>
                <div class="form-group">
                  <label>审核状态</label>
                  <ui-select required style="width: 120px;" ng-model="item.checkState" theme="bootstrap">
                        <ui-select-match placeholder="选择分类">{{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="item.id as item in mappers.checkState | filter: $select.search">
                          <span ng-bind-html="item.name"></span>
                        </ui-select-choices>
                  </ui-select>
                </div>
                <div class="form-group">
                  <label>企业名</label>
                  <input required ng-model="item.companyName" type="text" class="form-control" placeholder="请输入企业名">
                </div>
                <div class="form-group">
                  <label>联系电话</label>
                  <input required ng-model="item.phone" type="text" class="form-control" placeholder="请输入联系电话">
                </div>
                <div class="form-group">
                  <label>价格</label>
                  <div>
                    <input required ng-model="model.priceRange[0]" type="text" class="form-control inline" style="width: 200px" placeholder="最低预算">
                    <input required ng-model="model.priceRange[1]" type="text" class="form-control inline" style="width: 200px" placeholder="最高预算">
                  </div>
                </div>
                <div class="form-group">
                  <label>产品分类与行业方向</label>
                  <div>
                    <ui-select required class="inline" style="width: 200px;" ng-model="item.classifyId" theme="bootstrap">
                        <ui-select-match placeholder="选择分类">{{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="item.id as item in mappers.classifyId | filter: $select.search">
                          <span ng-bind-html="item.name"></span>
                        </ui-select-choices>
                    </ui-select>
                    <ui-select required class="inline" style="width: 200px;" ng-model="item.directionId" theme="bootstrap">
                        <ui-select-match placeholder="选择方向">{{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="item.id as item in mappers.directionId | filter: $select.search">
                          <span ng-bind-html="item.name"></span>
                        </ui-select-choices>
                    </ui-select>
                  </div>
                </div>
                <div class="form-group">
                  <label>产品标签</label>
                  <tags-input required ng-model="model.tags" min-length=1 display-property="name" on-tag-adding="addTag($tag)"></tags-input>

                  <label>推荐标签</label>
                  <div>
                      <button ng-repeat="i in mappers.recommandTags" class="btn m-b-xs w-xs btn-info btn-rounded" ng-click="addTags(i)">{{i.tagName}}</button>
                  </div>
                </div>
                <div class="form-group">
                  <label>产品描述</label>
                  <div id="myEditor{{editorid}}"></div>
                </div>
                <div class="form-group">
                  <button ng-disabled="form.$invalid" ng-click="submit()" type="submit" class="btn btn-primary">保存并发布</button>
                  <a href="#/app/product/list" class="btn btn-primary">返回</a>
                </div>
            </div>
        </div>
        </form>
    </div>
</div>